﻿<%@ CODEPAGE=65001 %>
<%Response.Charset="UTF-8"%>
<!--#include file="inc/System.asp"-->
<%
if request("lang")="en" then
  yy="en"
else 
	yy="cn"
end if
response.write book_temp(yy)
function tempclass(mb,yy)
Martech=qbq(mb)
Martech=sys(Martech)'系统
Martech=memu(Martech)'导航
Martech=Category(Martech)'分类
'Martech=Product(Martech)'列表
Martech=Books(Martech)
Martech=FriendLink(Martech)'友情连接
Martech=Flash(Martech)'flash轮播广告
tempclass=Martech
end function





if request("action")="Save" then
id=Request.Form("fid")
if id="" or not isnumeric(id) then url_return "参数错误!"

'--检查表单数据完整性
sql="select * from "&tbl&"Martech_Form_q where fid="&id&" order by id asc"
set rs=server.CreateObject("ADODB.RECORDSET")
rs.open sql,conn,1,1
do while not rs.eof
	v="a_"&rs("id")&""
	if rs("y")=1 then
		if Request.Form(v)="" then url_return "带*的为必填(选)项!"
	end if
	aa=aa&Replace(Request.Form(v),"|"," ")&"|"
	rs.MoveNext
loop
rs.Close
aa=htmlencode(aa)
'--录入数据
sql="select * from "&tbl&"Martech_Form_c"
set rs=server.CreateObject("ADODB.RECORDSET")
rs.open sql,conn,1,3
rs.Addnew
rs("fid")=id
rs("a")=aa
rs("ip")=getip()
rs("addtime")=now()
rs.Update
rs.Close
Set rs=Nothing
url_go "提交成功!","Book.asp?id="&id&""
end if

%>